/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.edu.javeriana.negocio;

import java.util.Random;
/**
 *
 * @author Juan Pablo Granados
 */
public class Sensor {
    static final double MIN=0;
    static final double MAX=50;
    Random r;
    
    public void Sensor(){
        r = new Random();
    }
    public Double getTemperatura(){
        if(r == null){
            r = new Random();
        }
        double lectura = r.nextDouble();
        return new Double(this.MIN + (this.MAX - this.MIN) * lectura);
    }
    
}
